<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="../include/tag.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>保险信息</title>
    <%@include file="../include/commonFile.jsp" %>
    <link rel="stylesheet" href="${ctx}/css/ui/gatherInfo/gather_info_detail.css">
</head>
<body>
<form id="myForm" class="layui-form info-container" action="${ctx}/gatherInfo/member/verifyInsuranceInfo.do">
    <fieldset class="aui-field-title">
        <legend>个人信息</legend>
    </fieldset>
    <table class="layui-table" lay-skin="nob">
        <colgroup>
            <col width="120">
            <col>
        </colgroup>
        <tbody>
        <tr>
            <td class="tr">姓&emsp;&emsp;名</td>
            <td class="tl">${member.fullname}</td>
        </tr>
        <tr>
            <td class="tr">性&emsp;&emsp;别</td>
            <td class="tl"><c:if test="${member.sex == 1}">男</c:if><c:if test="${member.sex == 0}">女</c:if></td>
        </tr>
        <tr>
            <c:if test="${memberInfo.useCertificate == 0}">
                <td class="tr">身&ensp;份&ensp;证</td>
                <td class="tl">${memberInfo.idCard}</td>
            </c:if>
            <c:if test="${memberInfo.useCertificate == 1}">
                <td class="tr">台&ensp;胞&ensp;证</td>
                <td class="tl">${memberInfo.taiwanCertificate}</td>
            </c:if>
            <c:if test="${memberInfo.useCertificate == 2}">
                <td class="tr">回&ensp;乡&ensp;证</td>
                <td class="tl">${memberInfo.returnCard}</td>
            </c:if>
            <c:if test="${memberInfo.useCertificate == 3}">
                <td class="tr">护&ensp;&ensp;&ensp;&ensp;照</td>
                <td class="tl">${memberInfo.passport}</td>
            </c:if>
        </tr>
        <tr>
            <td class="tr">出生日期</td>
            <td class="tl"><fmt:formatDate value="${memberInfo.birthday}" pattern="yyyy-MM-dd"/></td>
        </tr>
        <tr>
            <td class="tr">手&emsp;&emsp;机</td>
            <td class="tl">${member.mobile}</td>
        </tr>
        <tr>
            <td class="tr">血&emsp;&emsp;型</td>
            <td class="tl">${memberInfo.bloodGroup}</td>
        </tr>
        <tr>
            <td class="tr">病&emsp;&emsp;史</td>
            <td class="tl">${memberInfo.medicalHistory}</td>
        </tr>
        </tbody>
    </table>

    <fieldset class="aui-field-title">
        <legend>紧急联系人</legend>
    </fieldset>
    <table class="layui-table" lay-skin="nob">
        <colgroup>
            <col width="120">
            <col>
        </colgroup>
        <tbody>
        <tr>
            <td class="tr">姓&emsp;&emsp;名</td>
            <td class="tl">${memberInfo.contactName}</td>
        </tr>
        <tr>
            <td class="tr">关&emsp;&emsp;系</td>
            <td class="tl">${memberInfo.contactRelation}</td>
        </tr>
        <tr>
            <td class="tr">手&emsp;&emsp;机</td>
            <td class="tl">${memberInfo.contactMobile}</td>
        </tr>
        <tr>
            <td class="tr">审核状态</td>
            <td class="tl">
                <input type="radio" name="perfectState" lay-filter="insuranceStatus" value="1" title="待审核"
                ${memberInfo.perfectState == "1" ? 'checked="checked"' : ''}
                />
                <input type="radio" name="perfectState" lay-filter="insuranceStatus" value="2" title="通过"
                ${memberInfo.perfectState == "2" ? 'checked="checked"' : ''}
                />
                <input type="radio" name="perfectState" lay-filter="insuranceStatus" value="3" title="未通过"
                ${memberInfo.perfectState == "3" ? 'checked="checked"' : ''}
                />
                <input type="hidden" name="id" value="${memberInfo.id}"/>
                <input type="hidden" name="infoMemberId" value="${infoMember.id}" />
            </td>
        </tr>
        </tbody>
    </table>
    <div class="footer-buttons">
        <a class="layui-btn layui-btn-danger" lay-submit lay-filter="*" href="javascript:void(0)">提交</a>
        <a class="layui-btn layui-btn-normal" href="javascript:closeSelf()">取消</a>
    </div>
    <div class="footer-place"></div>
</form>
<%@include file="../include/incScript.jsp" %>
<script type="text/javascript">
    $(function () {
        layui.use(['form'], function () {
            var form = layui.form;

            //监听提交
            form.on('submit', function (data) {
                txz.submitObject(data.elem, function (callBack) {
                    var action = $("#myForm").attr("action");
                    $.post(action, $('#myForm').serialize(), function (res) {
                        typeof callBack === 'function' && callBack();
                        if (res.success) {
                            util.layerMsgSuccess("提交成功", function () {
                                parent.submitFunction('#myForm');
                            });
                        } else {
                            util.layerMsgError("提交失败")
                        }
                    });
                    return false;
                });
            })
        });
    })

    function closeSelf() {
        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
        top.layer.close(index);
    }
</script></body>
</html>